import request from '../../utils/request';




export interface DanceListModel {
    pageSize: number,
    pageNum: number,
    localCache?: number,
    column?: string
}
export type DanceList = DanceListModel[]

export default {

    getDanceList(token:string,pageSize:number,pageNum:number,localCache:number) {
        return request.get<any,DanceList>(`/moment/moments/rec/default?access_token=${token}&column=recommend&pageSize=${pageSize}&pageNum=${pageNum}&localCache=${localCache}`)
    },
    getLoadList(pageSize:number,pageNum:number,localCache:number) {
        return request.get<any>(`/moment/moments/rec/default?access_token=5858c60a-7a7c-4593-869e-3019e126c4f2&column=recommend&pageSize=${pageSize}&pageNum=${pageNum}&localCache=${localCache}`)
    },
    getWorksList(access_token:string,pageSize:number,pageNum:number,column:string,data={}) {
        // console.log('token',access_token)
        // return request.post<any,any>(`/moment/moments/collect/original/integrated?access_token=c494ae44-3adc-48ca-8749-5128a53358d7`,{pageSize,pageNum,column})
        return request({
            method:'post',
            params:{
                access_token,
                pageSize,
                pageNum,
                column
            },
            url:'/moment/moments/collect/original/integrated',
            data

        })
    },
    getHotPracticeList(access_token:string,pageSize:number,pageNum:number,column:string,data={}) {
        return request({
            method:'post',
            params:{
                access_token,
                pageSize,
                pageNum,
                column
            },
            url:'/moment/moments/collect/original/popTraining',
            data

        })
    },
    getAggressiveList(access_token:string,pageSize:number,pageNum:number,column:string,data={}) {
        return request({
            method:'post',
            params:{
                access_token,
                pageSize,
                pageNum,
                column
            },
            url:'/moment/moments/collect/original/newcomer',
            data

        })
    },
    getNewsList(access_token:string,pageSize:number,pageNum:number,column:string,data={}) {
        return request({
            method:'post',
            params:{
                access_token,
                pageSize,
                pageNum,
                column
            },
            url:'/moment/moments/collect/original/lastest',
            data

        })
    },
    getCourseList(access_token:string,pageSize:number,pageNum:number,column:string,data={}) {
        return request({
            method:'post',
            params:{
                access_token,
                pageSize,
                pageNum,
                column
            },
            url:'/moment/moments/collect/course/integrated',
            data

        })
    },
    getSpecialTopicList(access_token:string,pageSize:number,pageNum:number,column:string,data={}) {
        return request({
            method:'post',
            params:{
                access_token,
                pageSize,
                pageNum,
                column
            },
            url:'/moment/moments/collect/specialTopic/integrated',
            data

        })
    },
    getInformationList(token:string,pageSize:number,column:number) {
        return request.get<any,DanceList>(`/moment/moments/frontDynamic/default?access_token=${token}&pageSize=${pageSize}&column=${column}`)
    },
}

// https://www.dance365.com/apis/moment/moments/frontDynamic/default?access_token=c494ae44-3adc-48ca-8749-5128a53358d7&pageSize=20&column=frontDynamic
// https://www.dance365.com/apis/moment/moments/frontDynamic/default?access_token=c494ae44-3adc-48ca-8749-5128a53358d7&pageSize=20&column=frontDynamic
